package com.liang.jiekou.controller;



import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.liang.jiekou.entity.Result;
import com.liang.jiekou.entity.result.INVMBL;
import com.liang.jiekou.entity.result.MOCTAB;
import com.liang.jiekou.service.INVMLService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;


@Api(tags = "库存控制器")
@RestController
@CrossOrigin
public class INVMLController {
    @Resource
    INVMLService invmlService;


    @ApiOperation("根据品号或者仓库查询库存相关信息")
    //调用方法查库存，并返回查询结果
    @GetMapping("/selectINVML")
    public Result<IPage<INVMBL>> selectINVML(@RequestParam Integer page, @RequestParam Integer pageSize, String ML001, String ML002){

        Page<INVMBL> paging = new Page<>(page, pageSize);

        IPage<INVMBL> invmbliPage = invmlService.selectINVMBLall(paging,ML001,ML002);

        return Result.success(invmbliPage );

    }
}
